package com.wt.admin.config;


import com.aizuda.easy.security.exp.IErrorCode;

public class CheckException extends RuntimeException implements IErrorCode{

    private Integer code;
    private String msg;


    public void setCode(Integer code) {
        this.code = code;
    }


    public void setMsg(String msg) {
        this.msg = msg;
    }

    private CheckException(){
    }

    public CheckException(Integer code,String msg){
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public CheckException(IErrorCode iErrorCode){
        super(iErrorCode.getMsg());
        this.code = iErrorCode.getCode();
        this.msg = iErrorCode.getMsg();
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
